package com.apesource.mallproject.service.ServiceImpl;

import com.apesource.mallproject.dao.IBrandDao;
import com.apesource.mallproject.pojo.Brand;
import com.apesource.mallproject.service.IBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandServiceImpl implements IBrandService {
    @Autowired
    private IBrandDao iBrandDao;

    @Override
    public List<Brand> queryAllBrand() {

        return iBrandDao.queryAllBrand();
    }

    @Override
    public void insertBrand(String name, String jPing) {
        iBrandDao.insertBrand(name, jPing);
    }

    @Override
    public void updateBrand(String name, String jPing, Integer id) {
        iBrandDao.updateBrand(name, jPing, id);
    }

    @Override
    public void delBrand(Integer id) {
        iBrandDao.delBrand(id);
    }

    @Override
    public int batchDelete(String[] ids) {
        return iBrandDao.batchDelete(ids);
    }
}
